//notes from Kiko
//make the input information smaller than what it was before. More manageable and readable this way
#pragma once
#include "DirectX_includes.h"

class Input
{
private:
	IDirectInput8 * m_pDIObject;						//mouse input object
	IDirectInputDevice8 * m_pDIKeyboard, * m_pDIMouse;	//keyboard and mouse input devices
	DIMOUSESTATE2 mouseState;							//manages what state the mouse is in
	char buffer[256];
	bool key[256];										//checks to see if key was pressed
	bool m_bKeyDown[256];								//if mouse click was down
	HWND m_hWnd;										//window handler
	HRESULT hr;
	bool mouseClickDown;//debugging issue with m_bKeyDown to check for if left click down
public:
	//handle the exact instance the input happens
	void init(HWND, HINSTANCE);
	void Update();
public:
	//keyboard conditions
	bool KeyPressed(int);								//handles individual key presses for keyboard
	bool KeyDown(int);									//handles independent key down holds for keyboard
public:
	//mouse conditions
	inline DIMOUSESTATE2 getMouseState(){return mouseState;}//suggest to complier to execute to return to original mouse state
	POINT getMousePosition();							//return mouse position within screen coordinate
	bool leftClicked();
};